<?php
/**
 * Category abstraction.
 *
 * @category Zend
 * @package Category
 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc.
 * @version $Id$
 * @link http://framework.zend.com
 * @since Available since release 1.0
 * @license GPL v3
 */

class Application_Model_Category extends Disputeo_Model_Abstract
{   
    /**
     * Setup model properties
     * 
     * @param type $options 
     */
    public function __construct($options = array())
    {
        $this->setTable(new Application_Model_DbTable_Category());
        $this->setAttributes($options);
    }
    
    /**
     * Create a category object
     * 
     * @param array $data 
     */
    public static function create(array $data)
    {
        
    }
    
    /**
     * Get a category object
     * 
     * @param int $id 
     */
    public static function get($id)
    {
        
    }
    
    /**
     * Get an array of categories
     * 
     * @return Array
     */
    public static function getList()
    {
        $category = new self();
        $categories = $category->_table->fetchAll();
        $list = array();
        
        foreach ($categories as $category) {
            $list[$category['categoryId']] = $category['category'];
        }
        
        return $list;
    }
}